package com.zack.designPattern.singleton;

public class LazySingleton {

	private static LazySingleton ls;
	
	private LazySingleton(){
		System.out.println("lazy singleton");
	}
	
	public static LazySingleton getInstance(){
		if(LazySingleton.ls == null){
			synchronized(LazySingleton.class){
				if(LazySingleton.ls == null){
					LazySingleton.ls = new LazySingleton();
				}
			}
		}
		return LazySingleton.ls;
	}
}
